package com.xiaotao.controller;

import com.xiaotao.service.SystemService;
import com.xiaotao.util.ResponseUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("mysystem")
public class SystemController {
    @Resource
    private SystemService systemService;
    //每日进账和抽成的接口
    @GetMapping()
    public ResponseUtil getMoney(){
        return systemService.getMoney();
    }

    //按照日期
    @GetMapping("earnings/byDate")
    public ResponseUtil getMoneyByDate(){
        return systemService.getMoneyByDate();
    }
}
